/*================================================================
*   Copyright (C) 2017 LiuYao. All rights reserved.
*   
*   Filename : mytensorflow.h
*   Author : LiuYao
*   Date : 2017-12-19
*   Description : 
*
================================================================*/
#ifndef _MYTENSORFLOW_H
#define _MYTENSORFLOW_H

#include "../graph/node_wrapper.h"
#include "../graph/node.h"
#include "../matrix/matrix.h"
#include "../graph/ops/add_op.h"

using namespace std;

namespace mytensorflow{
    const NodeWrapper operator+(const NodeWrapper & lhs, const NodeWrapper & rhs);
    const NodeWrapper operator+(const NodeWrapper & node, const double num);
    const NodeWrapper operator+(const double num, const NodeWrapper & node);
    const NodeWrapper operator-(const NodeWrapper & lhs, const NodeWrapper & rhs);
    const NodeWrapper operator-(const NodeWrapper & node, const double num);
    const NodeWrapper operator-(const double num, const NodeWrapper & node);
    const NodeWrapper operator*(const NodeWrapper & lhs, const NodeWrapper & rhs);
    const NodeWrapper operator*(const NodeWrapper & node, const double num);
    const NodeWrapper operator*(const double num, const NodeWrapper & node);
    const NodeWrapper operator/(const NodeWrapper & lhs, const NodeWrapper & rhs);
    const NodeWrapper operator/(const NodeWrapper & node, const double num);
    const NodeWrapper operator/(const double num, const NodeWrapper & node);
    const NodeWrapper operator-(const NodeWrapper & node);
    NodeWrapper constant(const Matrix & value);
    NodeWrapper variable(const Matrix & value);
    NodeWrapper placeholder(const Shape & shape);
    NodeWrapper sum(const NodeWrapper & node);
    NodeWrapper exp(const NodeWrapper & node);
    NodeWrapper log(const NodeWrapper & node);
    NodeWrapper matmul(const NodeWrapper & lhs, const NodeWrapper & rhs);
    NodeWrapper sigmoid(const NodeWrapper & node);
    NodeWrapper pow(const NodeWrapper & lhs, const NodeWrapper & rhs);
    NodeWrapper multiply(const NodeWrapper & lhs, const NodeWrapper & rhs);
    NodeWrapper gradient_descent_optimizer(const NodeWrapper& node, double alpha = 0.1);
}

#endif
